<?php

namespace App\Providers\Services;

use App\Contracts\Services\SMSClient\SMSClientService;
use Illuminate\Support\ServiceProvider;

class SMSClientServiceProvider extends ServiceProvider
{
    protected $defer = true;

    /**
     * Bootstrap the application services.
     *
     * @return void
     */
    public function boot()
    {
        //
    }

    /**
     * Register the application services.
     *
     * @return void
     */
    public function register()
    {
        $this->app->singleton(SMSClientService::class, function ($app) {
            $config = $app['config']['sms']['default'];
            return new \App\Support\Services\SMSClient\SMSClientService($config);
        });
    }

    /**
     * Get the services provided by the provider.
     *
     * @return array
     */
    public function provides()
    {
        return [
            \App\Support\Services\SMSClient\SMSClientService::class
        ];
    }
}
